angular.module('wf-utils')
.service('qygConfiguration', ($rootScope, $http,userData)->
    loadValidator=()->
        $rootScope.phoneVd=/^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0-9])|176|173|178)+\d{8}$/
        $rootScope.idCardVd=/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/
        $rootScope.imgFileVd=/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/
        $rootScope.sortVd=/^[1-9][0-9]{0,5}$/
#    loadContractChannel=()->
#        $rootScope.contractChannel=[]
#        $http.get("/dictionary?dicIndex=21",params:{page:0,size:999})
#        .success((resp)->
#            if resp.code==0
#                list=[]
#                _.each resp.message.content,(item)->
#                    list.push({value:item.code,name:item.name})
#                $rootScope.contractChannel=list
#        )
    loadOtherParam=()->
        $rootScope.pickMonth = {
            datepickerMode: 'month',
            minMode: 'month'
        }
    init:()->
        ##加载统一校验规则
        loadValidator()
        loadOtherParam()
)
